package com.mall.mymall.service;

import com.mall.mymall.common.Result;
import com.mall.mymall.dao.dto.*;
import com.mall.mymall.dao.dto.querypage.OrderPageRequest;
import com.mall.mymall.dao.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mall.mymall.dao.entity.Products;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 十里坡
 * @since 2025-03-06
 */
public interface OrdersService extends IService<Orders> {
    QueryDto<OrderDto> pageOrders(OrderPageRequest orderPageRequest);

    boolean deleteById(Integer orderId);

    boolean update(OrderDto orderDto,Integer orderId);

    boolean creatOrder(OrderDto orderDto);

    boolean addOrder(List<OrderProductDto> productsList, Integer userId);

    boolean changeStatus(String orderStatus,Integer orderId);

    Result<String> applyRefund(Integer orderId, Map<String, String> body);

    OrderCountVo orderCount(OrderDto orderDto);

    List<Orders> orderList(Integer page,Integer size,Integer userId);

    String getStatus(Integer orderId);
}
